<div class="box grid_12">
	<div class="box-head">
		<h2>Add Content</h2>
	</div>
	<div class="box-content">
		<div class="block-fluid">
			<?php echo form_open_multipart('admincp/add_sitecontent'); ?>
			<fieldset>
				<script type="text/javascript">
							function changeitem(selectObj){  
								var id=selectObj.value;
								var dataString =  id;
						    		$.ajax({
						            url: "<?php echo base_url().'index.php/admincp/ajaxtypetocate/';?>"+ dataString ,
						            type:'POST', 
						            data: dataString, 
						            success: function(output_string){ 
						                    $(".resultajax").html(output_string);
						                },
						                error: function(){
						                    alert('null');
						                  }  
						            });  
								}
						</script>
				<div class="form-row">
					<div class="form-label">Loại</div>
					<div class="form-item">
						<?php if($alltype <> null):?>
						<select name="typeid" id="typeid" onchange="changeitem(this);">
							<option value="0" selected="selected">------------</option>
							<?php foreach($alltype as $type):?>
							<option value="<?php echo $type->id;?>">
								<?php echo $type->nametype;?>
							</option>
							<?php endforeach;?>
						</select>
						<?php endif;?>
					</div>
				</div>
				<div class="form-row">
					<div class="form-label">Danh mục</div>
					<div class="form-item">
						<span class="resultajax"> </span>
					</div>
				</div>

				<div class="form-row">
					<div class="form-label">Tiêu đề</div>
					<div class="form-item">
						<input type="text" name="namecontent" />
					</div>

				</div>
				<div class="form-row">
					<div class="form-label">Giá:</div>
					<div class="form-item">
						<input type="text" name="coins" size="10" value="0" />
					</div>

				</div>
				<div class="form-row">
					<div class="form-label">Giới thiệu</div>
					<div class="form-item">
						<textarea id="wysiwyg" name="description"
							style="height: 100px; width: 100%;"></textarea>
					</div>

				</div>
				<div class="form-row">
					<div class="form-label">Ảnh giới thiệu:</div>
					<div class="form-item">
						<input type="file" name="images" size=40 />
					</div>

				</div>

				<div class="form-row">
					<div class="form-label">File 1:</div>
					<div class="form-item">
						<input type="file" name="ifiles" size=40 />
					</div>

				</div>
				<div class="form-row">
					<div class="form-label">Screenshot 1:</div>
					<div class="form-item">
						<input type="file" name="ifiles_2" size=40 />
					</div>

				</div>
				<div class="form-row">
					<div class="form-label">Screenshot 2 (tùy chọn):</div>
					<div class="form-item">
						<input type="file" name="ifiles_3" size=40 />
					</div>

				</div>

				<div class="form-row">
					<div class="form-label">Kích hoạt</div>
					<div class="span9">
						<input type="radio" name="active" value="0" /> Không kích hoạt <input
							type="radio" name="active" value="1" /> Kích hoạt
					</div>
					<div class="clear"></div>

				</div>
				<div class="form-row">
					<div class="form-label"></div>
					<div class="span9">
						<input type="submit" name="submit" value="Chấp nhận" />
					</div>
					<div class="clear"></div>
				</div>
			</fieldset>

			<?php echo form_close(); ?>

		</div>
	</div>
</div>
